#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableBuffViewDao:DaoBase<TableBuffView>
    {
        public override string GetFileName()
        {
            return "TableBuffView.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableBuffView>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddOneIndex(TableBuffView model)
        {
            if (!cacheOneIndex.ContainsKey(model.BuffId.ToString()))
            {
                cacheOneIndex[model.BuffId.ToString()] = new List<TableBuffView>();
            }
            cacheOneIndex[model.BuffId.ToString()].Add(model);
        }
        public override void AddPrimaryIndex(TableBuffView model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.BuffViewId)) UnityEngine.Debug.LogError("数据表id重复:TableBuffView->id: " + model.BuffViewId);
            #endif
            cachePrimaryInt[model.BuffViewId] = model;
        }
        protected override TableBuffView ParseRowData(string[] rowData)
        {
            TableBuffView data = new TableBuffView();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.BuffViewId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.BuffId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.IsShowInManual = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.IsIgonreWhenImmediately = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.BuffIcon = rowData[4];
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.BuffName = string.Intern(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.BuffDesc = rowData[6];
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.PreferViewDuration = double.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.PreferViewOffDuration = double.Parse(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.IsShield = int.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.IsDizzy = int.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.IsGroup = int.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.GroupMaxNum = int.Parse(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.GroupBuffParticleId = ParseData<int>(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.GroupBuffParticleType = int.Parse(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.GroupBuffParticleBoneName = rowData[15];
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.GroupBuffParticleOffset = rowData[16];
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.BuffParticle = ParseData<int>(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.BuffParticleType = ParseData<int>(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.ParticleType = ParseData<int>(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.BuffParticleBoneName = ParseData(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.BuffOffset = ParseData(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.IsTransfigure = int.Parse(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.TransferTargetModelId = int.Parse(rowData[23]);
            }
            if (!string.IsNullOrEmpty(rowData[24]))
            {
                data.MaterialTransInfo = ParseData(rowData[24]);
            }
            if (!string.IsNullOrEmpty(rowData[25]))
            {
                data.IsSkinTrans = int.Parse(rowData[25]);
            }
            if (!string.IsNullOrEmpty(rowData[26]))
            {
                data.SkinTransOn = ParseData<int>(rowData[26]);
            }
            if (!string.IsNullOrEmpty(rowData[27]))
            {
                data.SkinTransOff = ParseData<int>(rowData[27]);
            }
            if (!string.IsNullOrEmpty(rowData[28]))
            {
                data.IsSlience = int.Parse(rowData[28]);
            }
            if (!string.IsNullOrEmpty(rowData[29]))
            {
                data.SlienceSkillClass = ParseData<int>(rowData[29]);
            }
            if (!string.IsNullOrEmpty(rowData[30]))
            {
                data.SlienceSkillIndex = ParseData<int>(rowData[30]);
            }
            if (!string.IsNullOrEmpty(rowData[31]))
            {
                data.IsModelTransparent = int.Parse(rowData[31]);
            }
            if (!string.IsNullOrEmpty(rowData[32]))
            {
                data.ModelTransparentDuration = double.Parse(rowData[32]);
            }
            if (!string.IsNullOrEmpty(rowData[33]))
            {
                data.DiceNumBuffParticle = int.Parse(rowData[33]);
            }
            if (!string.IsNullOrEmpty(rowData[34]))
            {
                data.DiceNumBuffParticleType = int.Parse(rowData[34]);
            }
            if (!string.IsNullOrEmpty(rowData[35]))
            {
                data.DiceNumParticleType = int.Parse(rowData[35]);
            }
            if (!string.IsNullOrEmpty(rowData[36]))
            {
                data.DiceNumBuffParticleBoneName = rowData[36];
            }
            if (!string.IsNullOrEmpty(rowData[37]))
            {
                data.DiceNumBuffOffset = rowData[37];
            }
            if (!string.IsNullOrEmpty(rowData[38]))
            {
                data.BuffOffViewInfo = rowData[38];
            }
            if (!string.IsNullOrEmpty(rowData[39]))
            {
                data.ChangeHitParticleId = int.Parse(rowData[39]);
            }
            if (!string.IsNullOrEmpty(rowData[40]))
            {
                data.ChangeHitParticleType = int.Parse(rowData[40]);
            }
            if (!string.IsNullOrEmpty(rowData[41]))
            {
                data.ChangeHitParticleBone = rowData[41];
            }
            if (!string.IsNullOrEmpty(rowData[42]))
            {
                data.ChangeHitParticleOffset = rowData[42];
            }
            if (!string.IsNullOrEmpty(rowData[43]))
            {
                data.IsRevive = int.Parse(rowData[43]);
            }
            if (!string.IsNullOrEmpty(rowData[44]))
            {
                data.TipWord = rowData[44];
            }
            if (!string.IsNullOrEmpty(rowData[45]))
            {
                data.TipWordSize = rowData[45];
            }
            if (!string.IsNullOrEmpty(rowData[46]))
            {
                data.IsTransferPosition = int.Parse(rowData[46]);
            }
            if (!string.IsNullOrEmpty(rowData[47]))
            {
                data.TransferParticle = ParseData<int>(rowData[47]);
            }
            if (!string.IsNullOrEmpty(rowData[48]))
            {
                data.TransferParticleBone = ParseData(rowData[48]);
            }
            if (!string.IsNullOrEmpty(rowData[49]))
            {
                data.IsChaos = int.Parse(rowData[49]);
            }
            if (!string.IsNullOrEmpty(rowData[50]))
            {
                data.IsCancelHitView = int.Parse(rowData[50]);
            }
            if (!string.IsNullOrEmpty(rowData[51]))
            {
                data.CancelHitViewSelectMutiRule = ParseData<int>(rowData[51]);
            }
            if (!string.IsNullOrEmpty(rowData[52]))
            {
                data.BuffOnAniName = rowData[52];
            }
            if (!string.IsNullOrEmpty(rowData[53]))
            {
                data.BuffOnAniArgs = rowData[53];
            }
            if (!string.IsNullOrEmpty(rowData[54]))
            {
                data.BuffOffAniName = rowData[54];
            }
            if (!string.IsNullOrEmpty(rowData[55]))
            {
                data.BuffOffAniArgs = rowData[55];
            }
            if (!string.IsNullOrEmpty(rowData[56]))
            {
                data.BuffLastAniName = rowData[56];
            }
            if (!string.IsNullOrEmpty(rowData[57]))
            {
                data.BuffLastAniConfigure = rowData[57];
            }
            if (!string.IsNullOrEmpty(rowData[58]))
            {
                data.DizzyState = rowData[58];
            }
            if (!string.IsNullOrEmpty(rowData[59]))
            {
                data.TransparentValue = float.Parse(rowData[59]);
            }
            if (!string.IsNullOrEmpty(rowData[60]))
            {
                data.BuffEffectAniName = rowData[60];
            }
            if (!string.IsNullOrEmpty(rowData[61]))
            {
                data.BuffEffectAniArgs = rowData[61];
            }
            if (!string.IsNullOrEmpty(rowData[62]))
            {
                data.ChangeHitAniName = rowData[62];
            }
            if (!string.IsNullOrEmpty(rowData[63]))
            {
                data.BuffEffectTimer = int.Parse(rowData[63]);
            }
            if (!string.IsNullOrEmpty(rowData[64]))
            {
                data.BuffEffectTimerArgs = rowData[64];
            }
            if (!string.IsNullOrEmpty(rowData[65]))
            {
                data.BuffSummonId = int.Parse(rowData[65]);
            }
            if (!string.IsNullOrEmpty(rowData[66]))
            {
                data.BuffFeatureEffectId = int.Parse(rowData[66]);
            }
            return data;
        }
    }
}
